import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/pages/Home.vue')
  },
  {
    path: '/wallet',
    name: 'Wallet',
    component: () => import('@/pages/Wallet.vue')
  },
  {
    path: '/orders',
    name: 'Orders',
    component: () => import('@/pages/Orders.vue')
  },
  {
    path: '/profile',
    name: 'Profile',
    component: () => import('@/pages/Profile.vue')
  },
  // 详情页面（不显示底部Tab）
  {
    path: '/product/:id',
    name: 'ProductDetail',
    component: () => import('@/pages/ProductDetail.vue')
  },
  {
    path: '/groupbuy/:id',
    name: 'GroupBuy',
    component: () => import('@/pages/GroupBuy.vue')
  },
  {
    path: '/payment/:orderId',
    name: 'Payment',
    component: () => import('@/pages/Payment.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 